package day4;

import java.util.Arrays;

public class Test6 {
    public static void main(String[] args) {
        //选择排序
        int[] array = {5, 2, 6, 5, 9, 0, 3};
        for (int i = 0; i < array.length-1; i++) {
            for (int j = i+1; j < array.length; j++) {
                if(array[i]>array[j]){
                    int temp = array[i];
                    array[i] = array[j];
                    array[j]=temp;
                }
            }
            
        }
        System.out.println(Arrays.toString(array));
    }
}
